<%@ Page Language="C#" AutoEventWireup="true" Theme="YUI" CodeFile="VenuesWithCampus.aspx.cs"
    Inherits="Reports_VenueWithCampus" %>

<%@ Register Src="../UserControls/Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Reports: Venues By Campus</title>
</head>
<body>
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="True">
        </ajaxToolkit:ToolkitScriptManager>
        <div id="ToolTip" style="position: absolute; z-index: 1000; text-align: left; display: none;">
        </div>
        <div id="doc3" class="yui-t1">
            <div id="hd">
                <asp:Panel ID="pnlMenu" runat="server">
                    <uc1:Menu ID="Menu1" runat="server"></uc1:Menu>
                </asp:Panel>
            </div>
            <div id="bd">
                <span style="font-size: large; font-weight: bold; float: left;">Manage Courses</span>
                <span syle="clear:both;"></span>
                <br />
                <br />
                <asp:DropDownList ID="ddCampus" runat="server" DataSourceID="odsCampus" DataTextField="CampusName"
                    DataValueField="CampusId">
                </asp:DropDownList>
                <asp:Button ID="btnGenerateReport" runat="server" OnClick="btnGenerateReport_Click"
                    Text="Generate Report" CssClass="inputbutton" />&nbsp;
                <asp:ObjectDataSource ID="odsVenues" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="SelectAllActiveAndContactDetailsAndAddressWCampusId" TypeName="PlacementManager.DAL.Venue_DAL">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddCampus" Name="CampusId" PropertyName="SelectedValue"
                            Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="odsCampus" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
                    OldValuesParameterFormatString="original_{0}" SelectMethod="SelectAll" TypeName="PlacementManager.CampusComponent"
                    UpdateMethod="Update">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="CampusName" Name="sortExpression" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:GridView ID="gvVenues" runat="server" DataSourceID="odsVenues" AutoGenerateColumns="False" SkinID="Results" AllowPaging="True">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="VenueId" DataNavigateUrlFormatString="~/Home/Venues.aspx?id={0}"
                            DataTextField="VenueName" HeaderText="Venue Name" >
                            <HeaderStyle VerticalAlign="Top" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="TelephoneNumber" HeaderText="Telephone" SortExpression="TelephoneNumber" />
                        <asp:BoundField DataField="Fax" HeaderText="Fax" />
                        <asp:BoundField DataField="FirstName" HeaderText="FName" SortExpression="FirstName" />
                        <asp:BoundField DataField="LastName" HeaderText="LName" SortExpression="LastName" />
                        <asp:BoundField DataField="JobTitle" HeaderText="JobTitle" SortExpression="JobTitle" />
                        <asp:BoundField DataField="EmailAddress" HeaderText="Email" SortExpression="EmailAddress" />
                        <asp:BoundField DataField="Address1" HeaderText="Address 1" SortExpression="Address1" />
                        <asp:BoundField DataField="Address2" HeaderText="Address 2" SortExpression="Address2" />
                        <asp:BoundField DataField="Street" HeaderText="Street" SortExpression="Street" />
                        <asp:BoundField DataField="PostCode" HeaderText="Post Code" SortExpression="PostCode" />
                        <asp:BoundField DataField="DivisionName" HeaderText="State" SortExpression="DivisionName" />
                    </Columns>
                    <PagerSettings Position="TopAndBottom" />
                    <HeaderStyle VerticalAlign="Top" />
                </asp:GridView>
            </div>
        </div>
        <div id="ft">
            &nbsp;
        </div>
    </form>
</body>
</html>
